<?php

namespace app\admin\model;

use app\admin\model\CommonModel;

class TeamModel extends CommonModel
{

    const FOOTBALL   = 0;
    const BASKETBLAL = 1;
    const ELECTRONIC = 2;


    public static $refundType = [
        self::FOOTBALL   => '足球',
        self::BASKETBLAL => '篮球',
        self::ELECTRONIC => '电竞',
    ];


    /**
     * @return \think\model\relation\BelongsTo
     * 获取联赛
     */
    public function leaMatch()
    {
        return $this->belongsTo('LeaMatchModel', 'lea_id');
    }

    public function getLogoAttr($value)
    {
        return config('verify.host') . $value;
    }


}
